/*
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.cms.model.QueryMetricListRequest;
import com.aliyuncs.cms.model.QueryMetricListResponse;
import com.aliyuncs.http.FormatType;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;

import java.util.HashMap;
import java.util.Map;

public class QueryMetricListSample {
    public static final String metrics_url = "metrics.open.res.szqx.com";
    public static final String access_keyId = "WuRYqjIrRCiBfEPX";
    public static final String access_keySecret = "tUM7eaffcLxeoWvJ3cWjBUl8ATKj7Y";

    public void queryMetricList_tianjimon() throws Exception{
        DefaultProfile.addEndpoint("metrics","cn-shenzhen-szqx-d01","Cms",metrics_url);

        IClientProfile profile = DefaultProfile.getProfile("cn-shenzhen-szqx-d01",access_keyId,access_keySecret);
        IAcsClient client = new DefaultAcsClient(profile);

        QueryMetricListRequest queryMetricListRequest = new QueryMetricListRequest();
        queryMetricListRequest.setAcceptFormat(FormatType.JSON);
        queryMetricListRequest.setContentType(FormatType.JSON);
        queryMetricListRequest.setProject("acs_rds");
        queryMetricListRequest.setMetric("MySQL_NetworkInNew");
        queryMetricListRequest.setLength("10");

        */
/*Map<String,String> dimensions = new HashMap<String, String>();
        dimensions.put("cluster","tianji-oss-A-20190516-267e");
        String json = JSONObject.toJSONString(dimensions);
        queryMetricListRequest.setDimensions(json);*//*


        QueryMetricListResponse queryMetricListResponse = client.getAcsResponse(queryMetricListRequest);
        System.out.println(JSONObject.toJSONString(queryMetricListResponse));

    }

    public static void main(String[] args){
        QueryMetricListSample queryMetricListSample = new QueryMetricListSample();
        try {
            queryMetricListSample.queryMetricList_tianjimon();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
*/
